package com.lby.psychology.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;



@Data
@Schema(name = "注册用户vo")
public class RegisteredUserVo {

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    private Long userId;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 昵称
     */
    @NotNull(message = "nickname 昵称不能为空")
    @Schema(description = "昵称")
    private String nickname;

    /**
     * 邮箱
     */
    @NotNull(message = "邮箱不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$",message = "邮箱不符合格式")
    @Schema(description = "邮箱")
    private String email;

    /**
     * 密码
     */
    @NotNull(message = "密码不能为空")
    @Min(value = 6,message = "密码长度不能小于6")
    @Schema(description = "密码")
    private String password;

    /**
     * 验证码
     */
    @Schema(description = "验证码")
    private String code;

}
